package day06;

public class Car {
    private String colour;
    private String brand;
    private double price;
    Car(){
        this.colour = null;
        this.brand = null;
        this.price = 0;
    }
    Car(String colour,String brand,double price){
        this.colour = colour;
        this.brand = brand;
        this.price = price;
    }
    public void forward(){
        System.out.println("前进");
    }
    public void retreat(){
        System.out.println("后退");
    }
    public void turn(){
        System.out.println("转弯");
    }
    public String getColour(){
        return this.colour;
    }
    public String getBrand(){
        return this.brand;
    }
    public double getPrice(){
        return this.price;
    }
    public void print(){
        System.out.println("颜色:"+this.colour);
        System.out.println("品牌:"+this.brand);
        System.out.println("价格:"+this.price);
    }
}
